<?php session_start();

require_once('Fachada.php');


$fachada = new Fachada();

if($_SESSION['ultimaAcaoMinhaConta'] != "CADASTROENQUETE"){
    unset($_SESSION["menssagemErro"]);
}

$menssagemErro = $_SESSION["menssagemErro"];

?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="/Esquina_da_TI/default.css" rel="stylesheet" type="text/css" media="screen" />
        <script type="text/javascript" src="formulario.js"></script>
        <title>Cadastro de Enquete</title>
    </head>
    <body>
        <center>
            <h1>Cadastro de Enquete</h1>
            <form id="formularioCadastroEnquete" name="formularioCadastroEnquete" method="POST" action="">
                <table cellspacing="1" cellpadding="1">
                    <tr>
                        <td class="head" colspan="2">Registrar Informação</td>
                    </tr>
                    <tr>
                        <th>Titulo*:</th>
                        <td>
                            <input type="text" name="tituloEnquete" size="50" />
                        </td>
                    </tr>
                    <tr>
                        <th>Opcao1*:</th>
                        <td>
                            <input type="text" name="opcao1Enquete" size="30" />
                        </td>
                    </tr>
                    <tr>
                        <th>Opcao2*:</th>
                        <td>
                            <input type="text" name="opcao2Enquete" size="30" />
                        </td>
                    </tr>
                    <tr>
                        <th>Opcao3*:</th>
                        <td>
                            <input type="text" name="opcao3Enquete" size="30" />
                        </td>
                    </tr>
                    <tr><td colspan="2">&nbsp;</td></tr>
                    <tr><td colspan="2">&nbsp;</td></tr>
                    <tr><td colspan="2" align="center"><font color="red" size="2">( * ) Campo de preenchimento obrigatório.</font></td></tr>
                    <tr><td colspan="2">&nbsp;</td></tr>
                    <tr><td colspan="2" align="center"><?php $fachada->exibirMenssagemErro($_SESSION["menssagemErro"]); ?></td></tr>
                    <tr><td colspan="2">&nbsp;</td></tr>
                    <tr>
                        <td colspan="2" align="center">
                            <input type="button" value="Cadastrar" name="cadastrarEnquete" onclick="enviarFormularioEnquete('formularioCadastroEnquete')"/>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="reset" value="Cancelar" name="cancelarEnquete"  />
                        </td>
                    </tr>
                </table>
            </form>
            <?php
            // put your code here
            ?>
        </center>
    </body>
</html>
